﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using PublishNews.Entities;

namespace PublishNews.Models
{
    public class CreateNewsModel : BaseModel
    {
        public List<LocationModel> Locations { get; set; }

        [JsonProperty("title")]
        [System.ComponentModel.DataAnnotations.Required]
        public string Title { get; set; }

        [JsonProperty("content")]
        [System.ComponentModel.DataAnnotations.Required]
        public string Content { get; set; }

        [JsonProperty("categoryId")]
        [System.ComponentModel.DataAnnotations.Required]
        public Guid? CategoryId { get; set; }

        [JsonProperty("locationId")]
        [System.ComponentModel.DataAnnotations.Required]
        public Guid? LocationId { get; set; }

        [JsonProperty("userId")]
        public string UserId { get; set; }
        
        [JsonProperty("phoneNumber")]
        [System.ComponentModel.DataAnnotations.Required]
        [System.ComponentModel.DataAnnotations.Phone]
        public string PhoneNumber { get; set; }
        
        public bool Succeeded { get; set; }
    }
}